

#ifndef __LCD_H__
#define __LCD_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

/*
 * @brief   LCD Get Infomation
 * @param   direction:
 *          0 -- normal, portrait
 *          1 -- 90', landscape
 *          2 -- 180', mirror portrait
 *          3 -- 270', mirror landscape
 * @retval  0: success
 *         -1: failed
 */
int LCD_GetInfo(uint16_t *width, uint16_t *height, uint8_t *direction);

/*
 * @brief   LCD Initialization
 * @param   direction:
 *          0 -- normal, portrait
 *          1 -- 90', landscape
 *          2 -- 180', mirror portrait
 *          3 -- 270', mirror landscape
 * @retval  0: success
 *         -1: failed
 */
int LCD_Init(uint8_t direction);

int LCD_BackLightOp(int on_off);
int LCD_Clear(uint16_t color);
int LCD_SetDirection(uint8_t direction);
int LCD_FillBlock(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t *color);

#ifdef __cplusplus
}
#endif

#endif // __LCD_H__



